class BatteryCellTreeModel {
  ///告警状态，0正常 1告警
  int? alarmStatus;

  ///通信状态，0离线 1在线 2未配置
  int? connectStatus;
  int? deviceId;
  String? deviceName;
  dynamic ratedCapacity;
  int? runState;
  double? soc;

  BatteryCellTreeModel({
    this.alarmStatus,
    this.connectStatus,
    this.deviceId,
    this.deviceName,
    this.ratedCapacity,
    this.runState,
    this.soc,
  });

  @override
  bool operator ==(Object other) {
    if (other is BatteryCellTreeModel) {
      return other.deviceId == deviceId;
    } else {
      return false;
    }
  }

  factory BatteryCellTreeModel.fromMap(Map<String, dynamic> json) =>
      BatteryCellTreeModel(
          alarmStatus: json['alarmStatus'],
          connectStatus: json['connectStatus'],
          deviceId: json['deviceId'],
          deviceName: json['deviceName'],
          ratedCapacity: json['ratedCapacity'],
          runState: json['runState'],
          soc: json['soc']);

  @override
  // TODO: implement hashCode
  int get hashCode => super.hashCode;
}
